(function(){
	// var canvas = document.getElementById('coinAnimation');
	// var context = canvas.getContext('2d');
	
	// var coinImage = new Image();
	// coinImage.src = "coin-sprite-animation.png";
	// coinImage.onload = function() {
		// context.drawImage(coinImage, 0, 0, 1000, 100, 0, 0, 1000, 100);
	// };
	
	// function sprite (options) {
		
	// }
	
	var canvas = document.getElementById('myCanvas');
	var context = canvas.getContext('2d');
	
	
	
	var imageObj = new Image();
	imageObj.onload = function(){
		//drawImage(this);
		//context.drawImage(imageObj,30,0,0,0,10,10,1000,100);
		//context.drawImage(imageObj, sourceX, sourceY, sourceWidth, sourceHeight, destX, destY, destWidth, destHeight);
		//console.log(context);
		context.drawImage(imageObj,0,0,40,40,10,10,40,40);
	}
	
	imageObj.src = 'coin-sprite-animation.png';
	
	
}());

